<?php
require_once '../../../TCloudAutoLoader.php';
use TencentCloud\Common\Credential;
use TencentCloud\Common\Profile\ClientProfile;
use TencentCloud\Common\Profile\HttpProfile;
use TencentCloud\Common\Exception\TencentCloudSDKException;
use TencentCloud\Live\V20180801\LiveClient;
use TencentCloud\Live\V20180801\Models\DescribeStreamPlayInfoListRequest;
try {

    $cred = new Credential("AKIDCFUWKtWehbO0OXu9fwylW6UffRyKRYP2", "Yu1uXvFMGyUmuqV9h04wa0A64rRp14vh");
    $httpProfile = new HttpProfile();
    $httpProfile->setEndpoint("live.tencentcloudapi.com");
      
    $clientProfile = new ClientProfile();
    $clientProfile->setHttpProfile($httpProfile);
    $client = new LiveClient($cred, "ap-beijing", $clientProfile);

    $req = new DescribeStreamPlayInfoListRequest();
    
    $params = '{"StreamName":"live","StartTime":"2020-03-20 13:18:06","EndTime":"2020-03-20 15:12:14"}';
    $req->fromJsonString($params);


    $resp = $client->DescribeStreamPlayInfoList($req);

    print_r($resp->toJsonString());
}
catch(TencentCloudSDKException $e) {
    echo $e;
}